# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=yersinia
pkgver=0.8.2
pkgrel=2
pkgdesc="Framework for performing layer 2 attacks"
url="https://github.com/tomac/yersinia"
arch="all"
license="GPL"
makedepends="libnet-dev libpcap-dev ncurses-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/tomac/yersinia/archive/v$pkgver.tar.gz
	0001-fix-compile-with-GCC-10.patch"

prepare() {
	default_prepare
	update_config_guess
	update_config_sub
}

build() {
	./configure \
		--prefix=/usr \
		--with-pcap-includes=/usr/include \
		--disable-gtk
	make
}

check() {
	make check
}

package() {
	make DESTDIR=$pkgdir install
}

sha512sums="2c7c89f19b6791150c472a6066b6ffaf9ac5b3d1a3d2e6a27f91293bba9a0f72d147266731e5e2670e4bf7e67ccf04b6e353071ca42d3d281b25126c9bfcb1dd  yersinia-0.8.2.tar.gz
de7346e4ad2e77053d5de9fdce049c3dffc69ad08067676935ee53951aa4baa0510289d1a91593c595b9723aaa78876bf8e69d6767f3887a0b0b7cae92d2025d  0001-fix-compile-with-GCC-10.patch"
